<!DOCTYPE html>
<html ng-app>
<head lang="en">
    <meta charset="UTF-8">
    <title>sample</title>
    <script type="text/javascript" src="../../lib/jquery/1.11.0/jquery.min.js"></script>
    <script type="text/javascript" src="../../lib/angularjs/1.3.0-beta.5/angular.js"></script>
</head>
<body>
<form name="test_form" ng-controller="FormController">
    <input type="text" name="a" required ng-model="a" /><br/>
    <input type="text" name="b" required ng-minlength="2" ng-model="b" /><br/>
    <span>valid: {{ test_form.$valid }}</span><br/>
    <span>invalid: {{ test_form.$invalid }}</span><br/>
    <span>pristine:{{ test_form.$pristine }}</span><br/>
    <span>dirty:{{ test_form.$dirty }}</span><br/>
    <span>error:{{ test_form.$error }}</span><br/>
    <span ng-click="see()">submit</span><br/>
</form>
<script type="text/javascript">
    var FormController = ['$scope', function($scope) {
        $scope.see = function() {
            console.log($scope.test_form);
            console.log($scope.test_form.a);
        }
    }];
</script>
</body>
</html>